<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <!--{include file='comm/header.tpl'}-->
    <title>支付方式列表</title>
    <!--{include file='comm/icheck.tpl'}-->
    <!--{include file='comm/comm_editor.tpl'}-->
</head>
<body>

<div class="container">

        <div class="comm_content">
            <table id="flex" style="display: none"></table>
        </div>



    <!-- 新增、修改 -->
    <div id="pop1" style="display: none;">

        <form class="form-horizontal" id="pay_add_form" onsubmit="return false;">

            <div class="form-group">
                <label for="payTypeName" class="col-sm-3 control-label"><span class="red">*</span> 支付方式名称：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="payTypeName" name="payTypeName" placeholder="请输入支付方式名称" />
                    <input type="hidden" id="payTypeID" name="payTypeID" value="0" />
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label"> 支付方式logo：</label>
                <div class="col-sm-9">
                    <button type="button" class="btn btn-default" id="update_logo">点击上传logo</button>
                    <div id="logo_img_box" style="display: none;margin-top: 5px;"></div>
                    <input type="hidden" name="logo_img" id="logo_img" value="" />
                </div>
            </div>

            <div class="form-group">
                <label for="type" class="col-sm-3 control-label"><span class="red">*</span> 支付类型：</label>
                <div class="col-sm-9">
                    <select class="form-control w150" id="type" name="type">
                        <option value="0">请选择</option>
                        <option value="1">货到付款</option>
                        <option value="2">在线支付</option>
                        <option value="4">余额</option>
                        <option value="5">积分</option>
                    </select>
                </div>
            </div>

            <div class="form-group hide" id="platform">
                <label for="payment_platform-1" class="col-sm-3 control-label"><span class="red">*</span> 支付平台类型：</label>
                <div class="col-sm-9">
                    <div class="fl" style="margin-right: 10px;">
                        <input type="radio" class="square-radio" id="payment_platform-1" name="payment_platform" value="1" checked>
                        <label for="payment_platform-1">网上银行</label>
                    </div>
                    <div class="fl">
                        <input type="radio" class="square-radio" id="payment_platform-2" name="payment_platform" value="2">
                        <label for="payment_platform-2">支付平台</label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="web_usable-1" class="col-sm-3 control-label"><span class="red">*</span> web商城可用：</label>
                <div class="col-sm-9">
                    <div class="fl" style="margin-right: 10px;">
                        <input type="radio" class="square-radio" id="web_usable-1" name="web_usable" value="1" checked>
                        <label for="web_usable-1">是</label>
                    </div>
                    <div class="fl">
                        <input type="radio" class="square-radio" id="web_usable-0" name="web_usable" value="0">
                        <label for="web_usable-0">否</label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="web_usable-1" class="col-sm-3 control-label"><span class="red">*</span> wap商城可用：</label>
                <div class="col-sm-9">
                    <div class="fl" style="margin-right: 10px;">
                        <input type="radio" class="square-radio" id="wap_usable-1" name="wap_usable" value="1" checked>
                        <label for="wap_usable-1">是</label>
                    </div>
                    <div class="fl">
                        <input type="radio" class="square-radio" id="wap_usable-0" name="wap_usable" value="0">
                        <label for="wap_usable-0">否</label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="wx_usable-1" class="col-sm-3 control-label"><span class="red">*</span> 微信商城可用：</label>
                <div class="col-sm-9">
                    <div class="fl" style="margin-right: 10px;">
                        <input type="radio" class="square-radio" id="wx_usable-1" name="wx_usable" value="1">
                        <label for="wx_usable-1">是</label>
                    </div>
                    <div class="fl">
                        <input type="radio" class="square-radio" id="wx_usable-0" name="wx_usable" value="0" checked>
                        <label for="wx_usable-0">否</label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="app_usable-1" class="col-sm-3 control-label"><span class="red">*</span> app商城可用：</label>
                <div class="col-sm-9">
                    <div class="fl" style="margin-right: 10px;">
                        <input type="radio" class="square-radio" id="app_usable-1" name="app_usable" value="1">
                        <label for="app_usable-1">是</label>
                    </div>
                    <div class="fl">
                        <input type="radio" class="square-radio" id="app_usable-0" name="app_usable" value="0" checked>
                        <label for="app_usable-0">否</label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="backend_usable-1" class="col-sm-3 control-label"><span class="red">*</span> 客服下单可用：</label>
                <div class="col-sm-9">
                    <div class="fl" style="margin-right: 10px;">
                        <input type="radio" class="square-radio" id="backend_usable-1" name="backend_usable" value="1" checked>
                        <label for="app_usable-1">是</label>
                    </div>
                    <div class="fl">
                        <input type="radio" class="square-radio" id="backend_usable-0" name="backend_usable" value="0">
                        <label for="backend_usable-0">否</label>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label for="memo" class="col-sm-3 control-label"> 描述：</label>
                <div class="col-sm-9">
                    <textarea class="form-control w300" id="memo" name="memo" placeholder="请输入描述"></textarea>
                </div>
            </div>

        </form>

    </div>


    <div id="pop2" style="display: none;">

        <div class="panel panel-default">

            <div class="panel-heading">付款方式列表</div>

            <table class="table" class="form-inline">
                <thead>
                <tr>
                    <th>付款方式名称</th>
                    <th>付款方式类型</th>
                    <!--{if $edit_permission}-->
                    <th>操作</th>
                    <!--{/if}-->
                </tr>
                </thead>
                <tbody id="payment_method_list"></tbody>
                <tbody>
                <!--{if $edit_permission}-->
                    <tr>
                        <td>
                            <input class="form-control w150" type="text" id="paymentMethod_0" placeholder="请输入付款方式名称"/>
                        </td>
                        <td>

                            <select class="form-control" name="paymentMethod_type" id="type_id_0" style="width: 160px;">
                                <option value="">请选择付款方式类型</option>
                                <option value="1">现金</option>
                                <option value="2" selected>刷卡</option>
                            </select>

                        </td>
                        <td>
                            <button type="button" class="btn btn-primary" onclick="paymentMethod.edit.check(0);">新增</button>
                        </td>
                    </tr>

                <!--{/if}-->
                </tbody>
            </table>
        </div>

    </div>


    <div id="pop3" style="display: none;">

        <form class="form-horizontal" id="online_form" onsubmit="return false;">

            <div class="form-group">
                <label for="partnerID" class="col-sm-3 control-label"><span class="red">*</span> 商户号：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="partnerID" name="partnerID" placeholder="请输入商户号" />
                </div>
            </div>

            <div class="form-group">
                <label for="alias" class="col-sm-3 control-label"><span class="red">*</span> 别名：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="alias" name="alias" placeholder="请输入别名" />
                </div>
            </div>

            <div class="form-group">
                <label for="seller_email" class="col-sm-3 control-label">商户邮件地址：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="seller_email" name="seller_email" placeholder="请输入商户邮件地址" />
                </div>
            </div>

            <div class="form-group">
                <label for="seller_name" class="col-sm-3 control-label">商户名称：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="seller_name" name="seller_name" placeholder="请输入商户名称" />
                </div>
            </div>

            <div class="form-group">
                <label for="service" class="col-sm-3 control-label">接口名称：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="service" name="service" placeholder="请输入接口名称" />
                </div>
            </div>

            <div class="form-group">
                <label for="sign_type" class="col-sm-3 control-label"><span class="red">*</span> 签名方式：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="sign_type" name="sign_type" placeholder="请输入签名方式" />
                </div>
            </div>

            <div class="form-group">
                <label for="md5_key" class="col-sm-3 control-label">私钥：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="md5_key" name="md5_key" placeholder="请输入私钥" />
                </div>
            </div>

            <div class="form-group">
                <label for="private_key" class="col-sm-3 control-label">私钥文件地址：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="private_key" name="private_key" placeholder="请输入私钥文件地址" />
                </div>
            </div>

            <div class="form-group">
                <label for="public_key" class="col-sm-3 control-label">公钥文件地址：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="public_key" name="public_key" placeholder="请输入公钥文件地址" />
                </div>
            </div>

            <div class="form-group">
                <label for="charset" class="col-sm-3 control-label">字符集：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="charset" name="charset" placeholder="请输入字符集" />
                </div>
            </div>

            <div class="form-group">
                <label for="gate_url" class="col-sm-3 control-label">网关地址：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="gate_url" name="gate_url" placeholder="请输入网关地址" />
                </div>
            </div>

            <div class="form-group">
                <label for="version" class="col-sm-3 control-label">版本号：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="version" name="version" placeholder="请输入版本号" />
                </div>
            </div>

            <div class="form-group">
                <label for="extend_1" class="col-sm-3 control-label">扩展1：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="extend_1" name="extend_1" placeholder="请输入扩展1" />
                </div>
            </div>

            <div class="form-group">
                <label for="extend_2" class="col-sm-3 control-label">扩展2：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="extend_2" name="extend_2" placeholder="请输入扩展2" />
                </div>
            </div>

            <div class="form-group">
                <label for="extend_3" class="col-sm-3 control-label">扩展3：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="extend_3" name="extend_3" placeholder="请输入扩展3" />
                </div>
            </div>

            <div class="form-group">
                <label for="extend_4" class="col-sm-3 control-label">扩展4：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="extend_4" name="extend_4" placeholder="请输入扩展4" />
                </div>
            </div>

            <div class="form-group">
                <label for="extend_5" class="col-sm-3 control-label">扩展5：</label>
                <div class="col-sm-9">
                    <input type="text" class="form-control w300" id="extend_5" name="extend_5" placeholder="请输入扩展5" />
                </div>
            </div>

        </form>

    </div>

</div>

<script type="text/javascript">

    $(window).ready(function() {

        $(document).on('change', '#type', function() {

            if ($(this).val() == 2) {
                $('#platform').removeClass('hide');
            } else {
                $('#platform').addClass('hide');
            }

        });

    });

    $("#flex").flexigrid({
        url:"/invokingAjax-backend/system/payType.ajax?operFlg=1",
        dataType: "json",
        colModel : [
            {display: "操作", width : 120, align: 'center'},
            {display: "支付方式ID", name : "payTypeID" , width : 80 , sortable : true },
            {display: "支付方式名称", width : 100},
            {display: "描述", width : 200},
            {display: "支付类型", width : 100},
            {display: "web商城可用", width : 90 , align:"center"},
            {display: "wp商城可用", width : 90 , align:"center"},
            {display: "微信商城可用", width : 90 , align:"center"},
            {display: "app商城可用", width : 90 , align:"center"},
            {display: "客服下单可用", width : 90 , align:"center"},
            {display: "使用标志", width : 70, align: 'center'},
            {display: "是否默认", width : 70 , align:"center"}
        ],
        <!--{if $edit_permission}-->
        buttons : [
            {name: "添加", bclass: "add", onpress : "pay.edit.open"},
            {separator: true},
            {name: "删除", bclass: "delete", onpress : "pay.del.check"},
            {separator: true},
            {name: "全选", bclass: "checkAll", onpress : "E.checkAllList"},
            {separator: true},
            {name: "取消全选", bclass: "cancelCheckAll", onpress : "E.cancelCheckAllList"}
        ],
        <!--{/if}-->
        sortname: "payTypeID",
        sortorder: "asc",
        usepager: true,
        rp: 10,
        useRp: true,
        showTableToggleBtn: true
    });

    var edit_permission = <!--{$edit_permission}-->;

</script>

<script language="JavaScript" src="/quanliadmin/docroot/js/system/payType.js?v=20140707" type="text/javascript"></script>

</body>
</html>